import QtQuick
import QtQuick.Controls.Basic

Menu {
    id: menu

    Action {
        text: qsTr("置顶")
    }
    Action {
        text: qsTr("标记未读")
    }
    Action {
        text: qsTr("消息免打扰")
    }
    MenuSeparator {
        contentItem: Rectangle {
            implicitWidth: 100
            implicitHeight: 1
            color: "#d5d5d5"
        }
    }
    Action {
        text: qsTr("独立窗口显示")
    }
    Action {
        text: qsTr("不显示")
    }

    MenuSeparator {
        contentItem: Rectangle {
            implicitWidth: 100
            implicitHeight: 1
            color: "#d5d5d5"
        }
    }

    Action {
        id:delAct
        text: qsTr("删除")
    }

    topPadding: 2
    bottomPadding: 2

    delegate: MenuItem {
        id: menuItem
        implicitWidth: 100
        implicitHeight: 25
        font.pixelSize: 14
        contentItem: Text {
            text: menuItem.text
            font: menuItem.font
            opacity: enabled ? 1.0 : 0.3
            color: {
                menuItem.highlighted ? "#ffffff" : "black"
            }
            horizontalAlignment: Text.AlignLeft
            verticalAlignment: Text.AlignVCenter
            elide: Text.ElideRight
        }

        background: Rectangle {
            implicitWidth: 100
            implicitHeight: 40
            opacity: enabled ? 1 : 0.3
            color: menuItem.highlighted ? "#21be2b" : "transparent"
        }
    }
    background: Rectangle {
        implicitWidth: 100
        implicitHeight: 40
        color: "#ffffff"
        radius: 4
    }
}
